from django.urls import path,re_path

from users import views
from .views import my_decorator
from django.conf.urls import url

# urlpatterns 名字不能改
urlpatterns = [
    # 注册的路由
    path('users/register/',views.register),

    # 类视图注册路由
    # path匹配
    path('login/',views.LoginView.as_view()),
    # re_path 匹配
    # re_path(r'^login/$',views.LoginView.as_view()),
    # url匹配  （Django1.x版本用url）
    # url(r'^login/$',views.LoginView.as_view()),


    # 给类视图添加装饰器
    # path('login/',my_decorator(views.LoginView.as_view())),

    # 请求路径参数
    # path('request/<int:age>/',views.RequestView.as_view()),

    path('request/<mobile:mobile>/',views.RequestView.as_view()),
]